Image processing apparatus and recording medium

ABSTRACT

Plural areas defined by contours in a through image (live view image) are previously set as object segments whose luminance levels are to be altered. When a user touches a point within an object segment seen in the through image displayed on a touch panel LCD  12 , a gamma curve is changed to alter a luminance level of the object segment including the touched point. This arrangement allows the user to make more bright the whole of the object segment simply by touching a point within the object segment, and also to select any segment of an object as the object segment whose luminance level is to be altered.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing apparatus, and moreparticularly to an image processing apparatus for altering brightness ofimages.

2. Description of the Related Art

Conventional image pick-up apparatuses such as digital cameras, have agradation correcting function for correcting a gradation of an picked upimage. Using this gradation correcting function, an image can beobtained of a more clear object than the original picked up image.

A patent document 1 discloses a digital camera provided with thegradation correcting function. The digital camera disclosed in thepatent document 1 displays a through image (a live view image) on atouch panel LCD, allowing a user to touch a position in a main objectseen in the displayed thorough image to designate a certain area of thethrough image, and adjusts a gradation altering characteristic in aluminance range of a gamma correction for correcting an image signalexpressing the designated certain area of the through image, therebyadjusting brightness of the main object seen in the through image. Thedigital camera disclosed in the patent document 1 allows the user totouch and designate a position in the main object of the picked up imageto make brighter a predetermined area in the main object of the pickedup image.

A patent document 2 discloses an image pickup apparatus, which changes agradient assignment ratio to concentrate a gradient on a face portionand/or focused portion in an picked up image. The image pickup apparatusdisclosed by the patent document 2 can change a brightness level at theface portion and/or focused portion seen in the picked up image, makingthe face portion and/or focused portion more clear.

The patent document 1 is Japanese Patent No. 2006-50085 A, and thepatent document 2 is Japanese Patent No. 2008-118383 A.

The digital camera disclosed in the patent document 1 can correct abrightness level of only the predetermined area including the positionin the through image touched and designated by the user. Therefore, inthe case that the user wants to correct the brightness level of thewhole area of the main object, the user is required to repeatedlyperform troublesome operations, touching the through image several timesto designate the whole area of the main object.

In the image pickup apparatus disclosed in the patent document 2, thearea whose luminance level is to be changed is previously determined.Therefore, the image pickup apparatus has a disadvantage that cannotcorrect the brightness level of an area(s) other than the areapreviously determined.

The present invention has an object to provide an apparatus which caneasily alter luminance levels of arbitrary areas of a picked up image.

SUMMARY OF THE INVENTION

According to one aspect of the present invention, there is provided animage processing apparatus, which comprises a gradation correcting unitfor correcting a gradation of an image in accordance with a gradationaltering characteristic, an object segment setting unit for setting inthe image plural object segments whose luminance levels are to bealtered, an object segment selecting unit for selecting one objectsegment from the plural object segments set by the object segmentsetting unit in response to a single operation by a user, and agradation altering characteristic changing unit for changing thegradation altering characteristic in a luminance range of the objectsegment selected by the object segment selecting unit.

According to another aspect of the invention, there is provided acomputer readable recording medium mounted on an image processingapparatus provided with a computer, the recording medium having recordedthereon a computer program when executed to make the computer functionas units, which comprises a gradation correcting unit for correcting agradation of an image in accordance with a gradation alteringcharacteristic, an object segment setting unit for setting in the imageplural object segments whose luminance levels are to be altered, anobject segment selecting unit for selecting one object segment from theplural object segments set by the object segment setting unit inresponse to a single operation by a user, and a gradation alteringcharacteristic changing unit for changing the gradation alteringcharacteristic in a luminance range of the object segment selected bythe object segment selecting unit.

In the image processing apparatus of the present invention, plural areasin an image are set as object segments, and a gradation alteringcharacteristic is changed to alter a luminance level of an objectsegment which is selected from the plural object segments in response touser's single operation. Therefore, a luminance level of the whole of anarbitrary object segment can be altered simply by user's singleoperation.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a block diagram of an electric configuration of a digitalcamera 100.

FIG. 1B is a view showing a detailed configuration of DSP (DigitalSignal Processor) 5 in the digital camera 100.

FIG. 2 is a view showing a gamma curve G1 applied in a general gammacorrection process.

FIG. 3 is a flow chart of an operation performed in a shooting mode inthe first embodiment of the invention.

FIG. 4 is a view illustrating an example of an image 20 displayed on atouch panel LCD 12 in the first embodiment.

FIG. 5 is a flow chart of a gradation altering characteristic changingprocess performed in the first embodiment.

FIG. 6 is a view illustrating the image displayed on the touch panel LCD12, touched with a pen in the first embodiment.

FIG. 7 is a view showing an example of a gamma curve G2 changed in thegradation altering characteristic changing process in the firstembodiment.

FIG. 8 is a view illustrating an image 201 generated from the image 20which has been subjected to the gamma correction process using the gammacurve G2 in the first embodiment.

FIG. 9 is a flow chart of an operation performed in the shooting mode inthe second embodiment of the invention.

FIG. 10 is a view illustrating an example of an image 40 displayed onthe touch panel LCD 12 in the second embodiment.

FIG. 11 is a flow chart of a gradation altering characteristic changingprocess performed in the second embodiment.

FIG. 12 is a view showing an example of a gamma curve G3 changed in thegradation altering characteristic changing process in the secondembodiment.

FIG. 13 is a view illustrating an image 401 generated from the image 40which has been subjected to the gamma correction process using the gammacurve G3 in the first embodiment.

FIG. 14 is a flow chart of a gradation altering characteristic changingprocess performed in the modification to the first embodiment.

FIG. 15 is a view showing an example of a gamma curve applied in themodification to the first embodiment.

FIG. 16 is a view showing an example of a gamma curve applied in themodification to the first embodiment.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS First Embodiment of theInvention

Now, the first embodiment of the present invention will be described indetail with reference to the accompanying drawings. In the firstembodiment, an image processing apparatus of the present invention isapplied to a digital camera 100.

FIG. 1A is a block diagram illustrating a circuit configuration of thedigital camera 100 in the first embodiment of the invention. Withreference to FIG. 1A, various units of the digital camera 100 will bedescribed.

As shown in FIG. 1A, the digital camera 100 comprises an optical lenssystem 1, a shutter mechanism 2, CCD (Charge Coupled Device) 3, AEF(Analog Front End) 4, DSP (Digital Signal Processor) 5, CPU (CentralProcessing Unit) 6, a flash memory 7, DRAM (Dynamic Random AccessMemory) 8, a memory card 9, a key block 10, LCD driving circuit 11, anda touch panel LCD 12. All of these elements are electrically connectedwith each other through a system bus 13.

The optical lens system 1 is prepared for allowing an optical image ofan object to focus therein. The optical lens system 1 comprises ashooting lens including focus lenses (not shown) and zoom lenses (notshown), and a lens driving mechanism (not shown) for driving theshooting lens (focus lenses and zoom lenses). The lens driving mechanismdrives the focus lenses and zoom lenses along the optical axis inaccordance with a control signal supplied from CPU 6.

The shutter mechanism 2 serves as an aperture and a mechanical shutter.The aperture is a mechanism for serving to adjust a light volume of alight incoming from the object through the optical lens system 1. Theshutter mechanism serves to adjust an exposure time, during which CCD 3is exposed to light. The shutter mechanism 2 drives the mechanicalshutter to open and/or close in accordance with the control signalsupplied from CPU 6.

CCD 3 is an image pick-up device (photoelectric conversion element),which is used when the object is shot to convert an optical image of theobject into an electric signal. CCD 3 has a light receiving plane withphotodiodes disposed thereon. The photodiodes of CCD 3 performs aphotoelectric conversion of the optical image of the object focused onthe optical lens system 1, thereby accumulating an image signal of theobject. A driver (not shown) reads the image signal to supply the samesignal to AFE 4.

AFE 4 performs various processes on the image signal supplied from CCD 3to convert into a digital signal, wherein a correlated double samplingprocess, amplifying process, and A/D conversion process are included inthe various processes performed by the AFE 4. The converted digitalsignal is stored in DRAM 8. When the image signal is subjected to A/Dconversion process in AFE 4, the image signal is converted into adigital signal of 8 bits. Therefore, the digital signal indicates agradation level in the range of 0 to 255.

DSP 5 performs various processes, including a white balance process,gamma correction and YC conversion, on the digital signal stored in DRAM8, thereby producing image data with Y signal (luminance signal), Cbsignal (blue color-difference signal) and Cr signal (redcolor-difference signal) superimposed on. The image data produced by DSP5 is stored in DRAM 8 again. DSP 5 performs a compression process on theimage data.

FIG. 1B is a view illustrating a configuration of DSP 5 in detail. Asshown in FIG. 1B, DSP 5 serves as a contour detecting unit 5 a, asegment setting unit 5 b, a segment selecting unit 5 c, a lightmetering/calculating unit 5 d, a gamma correction processing unit 5 e,and a gamma characteristic changing unit 5 f.

The contour detecting unit 5 a performs a detecting process fordetecting a contour in an image expressed by the digital signal undercontrol of CPU 6, wherein the contour is an outline of an object seen inthe image displayed on the touch panel LCD 12. In the followingdescription, a segment surrounded by the contour detected by the contourdetecting unit 5 a and a segment defined by a frame of a shooting rangewill be referred to as “object segment(s)”.

According to need, a known technique for detecting a contour of anobject may be employed as the contour detecting unit 5 a in the presentembodiment. For example, a technique disclosed in Japanese Patent No.2004-341844 A may be employed. The technique described in JapanesePatent No. 2004-341844 A uses a contour-intensity enhancement filter toperform a mathematical operation of convolution on the image of theobject, thereby detecting a contour of the object from the image of theobject. Further, as the contour detecting unit 5 a may be used atechnique that detects a difference in luminance level between adjacentpicture elements in the image and determines as the contour the adjacentpicture elements which show the difference higher than a predeterminedlevel. Furthermore, it may be possible to make the contour detectingunit 5 a detect the contour of an image that is expressed based on theimage data passing through a high pass filter provided in DSP 5. When ashooting mode is set, the contour detecting unit 5 a performs a contourdetecting process on each of frame images (still images) composing alive view, thereby dynamically detecting a contour of the live view. Itmay be possible to make the contour detecting unit 5 a not to performthe contour detecting process of detecting the contour of the live viewevery time it receives one frame image, but to perform the contourdetecting process of detecting the contour of the live view every timeit receives plural frame images.

Under control of CPU 6, the segment setting unit 5 b sets objectsegments of an image expressed based on image data as segments whoseluminance levels are to be altered.

Under control of CPU 6, the segment selecting unit 5 c selects objectsegments of the image expressed based on the digital signal stored inDRAM 8 in response to user's touch operation onto the touch panel LCD12, wherein the object segment includes a point touched by the user. Thesegment selecting unit 5 c sends a signal indicating the selected objectsegments to the light metering/calculating unit 5 d.

Upon receipt of the signal indicating the selected object segment fromthe segment selecting unit 5 c, under control of CPU 6 the lightmetering/calculating unit 5 d extracts an image component of each objectsegment from the image expressed based on the digital signal stored inDRAM 8. The light metering/calculating unit 5 d calculates an averageluminance level of the selected object segment of the image expressedbased on the digital signal. The light metering/calculating unit 5 dsends the calculated average luminance level of the object segment tothe gamma correction processing unit 5 e.

Under control of CPU 6, the gamma correction processing unit 5 eperforms a gamma correction process on the digital signal stored in DRAM8 in accordance with a gamma curve previously recorded in the flashmemory 7.

The gamma correction processing unit 5 e has the gamma characteristicchanging unit 5 f, which changes the gamma correction characteristic.Under control of CPU 6, the gamma characteristic changing unit 5 fchanges a gradation altering characteristic that is used in the gammacorrection process to correct a gradation of the image. The digitalsignal produced by AFE 4 is a signal representing a level proportionalto a light volume of light which CCD 3 receives from the object. But ingeneral, since a human visual feature has a non-linear feature, it isnecessary to perform a gradation altering process on the digital signalto obtain an image having a non-linear gradation characteristicsatisfying the human visual feature, when the image is displayed and/orrecorded. This gradation altering process has the same effect as thegamma correction process. The gradation altering characteristic appliedin the gamma correction process is referred to as a “gamma curve”.

FIG. 2 is a view showing a gamma curve G1 which is applied in thegeneral gamma correction process. In the conventional image processingtechnique, the digital signal (image) is subjected to the gammacorrection process using the gamma curve G1 shown in FIG. 2 to satisfythe human visual feature. In FIG. 2, the horizontal axis indicates aninput luminance level, that is, a luminance level of the digital signalbefore subjected to the gamma correction process and the vertical axisindicates an output luminance level, that is, a luminance level of thedigital signal subjected to the gamma correction process. The gammacorrection processing unit 5 e alters the gamma curve G1 to a gammacurve G2 in accordance with the user's intention. A detailed processwill be described later, in which the gamma correction processing unit 5e alters the gamma curve G1 to the gamma curve G2. The gamma correctionprocessing unit 5 e performs the gamma correction process using thealtered gamma curve G2.

In FIG. 1A, CPU 6 sends control signals to various units of the digitalcamera 100, and controls as a whole operations of these units uponreceipt of response signals from these units. CPU 6 reads a program fromthe flash memory 7 to DRAM 8 to run the same. Further, CPU 6 operatesvarious units in accordance with a signal generated in response touser's key operation on the key block 10.

The flash memory 7 is a recording medium storing a program and data forperforming processes in accordance with a flow chart to be describedlater. The flash memory 7 is made of an appropriate semi-conductormemory device.

DRAM 8 is a buffer memory for temporarily storing the digital signalproduced by the AFE 4 and the image data generated by DSP 5. DRAM 8 alsoserves as a working area when CPU 6 performs various processes.

The memory card 9 is a recording medium, on which image data generatedin a shooting operation is recorded. The memory card 9 is detachablyinstalled on a camera body of the digital camera 100. The memory card 9is made of an appropriate semi-conductor memory device.

The key block 10 comprises a shutter key (not shown), a power key (notshown), a cross key (not shown) and a set key (not shown). The key block10 is operated by the user and sends CPU 6 a control signalcorresponding to the user's operation.

LCD driving circuit 11 reads the image data from DRAM 8 and generatesvideo signal from the image data. LCD driving circuit 11 drives picturecells of the touch panel LCD 12 in accordance with the generated videosignal, thereby displaying on the tough panel LCD 12 an imagerepresented by the video signal as a live view image. LCD drivingcircuit 11 comprises VRAM (Video Random Access Memory) and D/A converter(Digital/Analog converter).

The touch panel LCD 12 functions as a monitor (electronic finder) in theshooting mode, and also functions as a touch panel for detecting aposition of the touch panel LCD 12 where the user touches with his orher finger or with a pen. The touch panel LCD 12 is provided with atransparent pressure-sensitive touch panel on its display screen. In thefollowing description, user's touch on the display screen of the touchpanel LCD 12 with his or her finger or with the per is referred to as“touch operation”, and the position of the touch panel LCD 12 where theuser touches with his or her finger or with the pen is referred to as a“touch point”. When the user touches with his or her finger or with thepen an arbitrary position on the display screen of the touch panel LCD12, the touch panel LCD 12 calculates coordinates of the touch point onthe touch panel LCD 12, and sends CPU 6 a signal indicating thecalculated coordinates.

The system bus 13 is a data transmission pass, through which the unitsof the digital camera 100 are connected to each other, and exchangesdata with each other.

FIG. 3 is a flow chart of an operation performed by the digital camera100 in the shooting mode in the first embodiment of the invention. CPU 6reads the program from the flash memory 7 and expands the program onDRAM 8, thereby performing the operation in accordance with the flowchart of FIG. 3. The operation performed by the digital camera 100 inthe shooting mode will be described in detail with reference to the flowchart of FIG. 3.

CPU 6 displays a live view image (hereinafter, an “image”) on the touchpanel LCD 12 at step SA1. More specifically, CPU 6 makes DSP 5 supplythe produced image data to LCD driving circuit 11, and makes LCD drivingcircuit 11 drive the touch panel LCD 12 to display a live view imagerepresented by the supplied image data. Thereafter, CPU 6 successivelysupplies the image data successively produced by DSP 5 to LCD drivingcircuit 11, thereby displaying live view images on the touch panel LCD12.

An image displayed on the touch panel LCD 12 at first is the image whichhas been corrected in the gamma correction process using the gamma curveG1 shown in FIG. 2. For example, in the case where an image 20 shown inFIG. 4 has been shot in a live view displaying process, an image whichis obtained from the image 20 corrected in the gamma correction processusing the gamma curve G1 is displayed on the touch panel LCD 12 atfirst. As shown in FIG. 4, an external frame 30 defines a shooting angleand within the external frame 30 of the image 20 are seen a human face211, head hair 212, his right eye 213, his left eye 214, cloud 22,mountain 23, and sky 24.

As shown in FIG. 4, a menu item 31 of “Brighten” and a menu item 32 of“Darken” are displayed together with the image 20 on the touch panel LCD12, wherein the menu item 31 of “Brighten” means an instruction ofmaking higher a luminance level of the touched object segment, and themenu item 32 of “Darken” means an instruction of making lower aluminance level of the touched object segment.

At step SA2, CPU 6 makes the contour detecting unit 5 d of DSP 5 detecta contour of an object seen in the image expressed by the digital signaland displayed on the touch panel LCD 12. Take for example the image 20shown in FIG. 4, a contour 211 a of the human face 211, a contour 212 aof the head hair 212, a contour 213 a of his right eye 213, a contour214 a of his left eye 214, a contour 22 a of the cloud 22, and a contour23 a of the mountain 23 are detected in the process at step SA2.

At step SA3, CPU 6 makes the segment setting unit 5 b of DSP 5 setplural areas defined by the contours detected at step SA2 as pluralobject segments whose luminance levels are to be altered. The objectsegments are closed areas defined by the detected contours or by theexternal frame 30 defining a shooting angle. Take for example the image20, the object segments are areas where the human face 211, head hair212, his right eye 213, his left eye 214, cloud 22, mountain 23, and sky24 are seen respectively.

CPU 6 judges with the image displayed on the touch panel LCD 12 at stepSA4, whether or not an instruction of altering a luminance level hasbeen given by the user. More specifically, CPU 6 determines at step SA4that the instruction of altering a luminance level has been given (YESat step SA4), when CPU 6 receives from the touch panel LCD 12 a signalindicating the instruction of making higher a luminance level or theinstruction of making lower a luminance level in response to user'stouch operation with his or her finger or with the pen. Then, CPU 6advances to step SA5. Meanwhile, CPU 6 determines at step SA4 that theinstruction of altering a luminance level has not been given (NO at stepSA4), when CPU 6 receives no signal indicating the instruction ofaltering a luminance level from the touch panel LCD 12, and sets analtering condition according to the menu item 31 of “Brighten”. Then,CPU 6 advances to step SA6.

At step SA5, CPU 6 sets the altering condition of “Brighten” or alteringcondition of “Darken” depending upon a signal sent from the touch panelLCD 12. When the user has touched the menu item 31 of “Brighten” on thetouch panel LCD 12, CPU 6 keeps the altering condition of “Brighten”until it receives a signal instructing to the contrary, and CPU 6records in DRAM 8 data indicating that the altering condition of“Brighten” has been set. Meanwhile, when the user has touched the menuitem 32 of “Darken” on the touch panel LCD 12, CPU 6 keeps the alteringcondition of “Darken” until it receives a signal instructing to thecontrary, and CPU 6 records in DRAM 8 data indicating that the alteringcondition of “Darken” has been set. The user is allowed to change thealteration by touching the menu item 31 or 32, every time CPU 6 returnsto step SA5.

At step SA6, CPU 6 is brought into a standby state for user's “touchoperation” on the touch panel LCD 12 to select an object segment whoseluminance level is to be altered. In the standby state, the user isallowed to touch his or her desired point on the image displayed on thetouch panel LCD 12 to select an object segment whose luminance level isto be altered. When the user has touched the touch panel LCD 12 with hisor her finger or with the pen and CPU 6 receives from the touch panelLCD 12 a signal indicating coordinates of the touch point at step SA6(YES at step SA6), then CPU 6 advances to step SA7. Meanwhile, when CPU6 receives from the touch panel LCD 12 no signal indicating coordinatesof the touch point at step SA6 (NO at step SA6), then CPU 6 advances tostep SA8. The user is allowed to touch an arbitrary point on the imageto select an object segment, every time CPU 6 returns to step SA6,whereby the user can touch plural object segments.

CPU 6 performs a gradation-altering characteristic changing process atstep SA7. FIG. 5 is a flow chart showing the gradation-alteringcharacteristic changing process performed at step SA7. Thegradation-altering characteristic changing process will be described indetail with reference to the flow chart of FIG. 5.

At step SA71 in FIG. 5, CPU 6 supplies the signal received from thetough panel LCD 12 (signal indicating coordinates of the touch point) tothe segment selecting unit 5 c of the DSP 5. The segment selecting unit5 c confirms in the image expressed by digital signal stored in DRAM 8an object segment (object segment touched by the user) including thecoordinates of the touch point indicated by the signal supplied from CPU6 and selects the confirmed object segment as an area whose luminancelevel is to be altered. The segment selecting unit 5 c sends the lightmetering/calculating unit 5 d a signal indicating the selected objectsegment. In the case the user touches plural object segments at step SA6in FIG. 3, the segment selecting unit 5 c selects the plural objectsegments as object segments whose luminance levels are to be altered,every time CPU 6 returns to step SA71 in FIG. 5.

At step SA72, CPU 6 makes the light metering/calculating unit 5 d of DSP5 calculate an average luminance level “B” of the selected objectsegment of the image expressed by digital signal stored in DRAM 8. Theaverage luminance level “B” is an average of luminance levels of pictureelements composing the object segment selected at step SA71.

CPU 6 judges at step SA73 whether or not the menu item 31 of “Brighten”is set currently. More specifically, CPU 6 confirms data stored in DRAM8, indicating the currently set altering condition, thereby judgingwhether or not the menu item 31 of “Brighten” is set currently. When itis determined that the menu item 31 of “Brighten” is currently set (YESat step SA73), CPU 6 advances to step SA74. Meanwhile, when it isdetermined that the menu item 31 of “Brighten” is not currently set (NOat step SA73), CPU 6 determines that the menu item 32 of “Darken” iscurrently set, and advances to step SA75.

At step SA74, CPU 6 makes the gamma characteristic changing unit 5 f ofDSP 5 change the gamma curve G1 (gradation altering characteristic).More specifically, under control of CPU 6, the gamma characteristicchanging unit 5 f changes the gamma curve G1 in a predetermined range ΔB(for example, ΔB is 10) in the vicinity of the average luminance levelof “B” calculated at step SA72. For example, the gamma characteristicchanging unit 5 f partially increases a portion of the gamma curve G1 ina range of input luminance levels form (B−ΔB) to (B+ΔB). The increasedportion of the gamma curve G1 can be replaced with a spline curvepassing through three points such as a first point, a second point and athird point on the gamma curve G1, wherein the first point is a point onthe gamma curve 51 corresponding to the input luminance level (B−ΔB),the second point is a point where an output luminance level is given bya doubled input luminance level (doubled average luminance level “B”)“2B”, and the third point is a point on the gamma curve G1 correspondingto the input luminance level (B+ΔB). The spline curve is a linegenerated by a well known spline curve interpolation method.

At step SA75, CPU 6 makes the gamma characteristic changing unit 5 f ofDSP 5 change the gamma curve G1 (gradation altering characteristic).More specifically, under control of CPU 6, the gamma characteristicchanging unit 5 f changes the gamma curve G1 in a predetermined range ΔBin the vicinity of the average luminance level of “B” calculated at stepSA72. For example, the gamma characteristic changing unit 5 f partiallydecreases a portion of the gamma curve G1 in a range of input luminancelevels form (B−ΔB) to (B+ΔB). The decreased portion of the gamma curveG1 can be replaced with a spline curve passing through three points suchas a first point, a second point and a third point on the gamma curveG1, wherein the first point is a point on the gamma curve G1corresponding to the input luminance level (B−ΔB), the second point is apoint where an output luminance level is given by half (0.5 c) of theinput luminance level (average luminance level) “B”, and the third pointis a point on the gamma curve G1 corresponding to the input luminancelevel (B+ΔB).

In FIG. 6 is illustrated the image 20 displayed on the touch panel LCD12 (shown in FIG. 4), which has been processed as followed. The menuitem 31 of “Brighten” is touched, and a point within the segment of thehuman face 211 is touched with the altering condition of “Brighten” set,and thereafter the menu item 32 of “Darken” is touched, and a pointwithin the segment of the cloud 22 is touched with the alteringcondition of “Darken” set. In FIG. 6, a mark of “+” indicates that thesegment of the human face 211 with the mark of “+” attached is touchedby the user to make higher the luminance level thereof, and a mark of“−” indicates that the segment of the cloud 22 with the mark of “−”attached is touched by the user to make lower the luminance levelthereof. As described, the user touches the object segment, therebysetting the object segment to altering condition of “Brighten” oraltering condition of “Darken”.

In FIG. 7 is shown an example of a gamma curve G2 changed in thegradation-altering characteristic changing process at step SA7. Thegamma curve G2 shown in FIG. 7 is a curve changed in thegradation-altering characteristic changing process performed withrespect to the image shown in FIG. 6. In FIG. 7, an input luminancelevel “B1” corresponds to the average luminance level of the segment ofthe human face 211 shown in FIG. 6 and an input luminance level “B2”corresponds to the average luminance level of the segment of the cloud22 shown in FIG. 6. As shown in FIG. 7, in the range of input luminancelevels from (B1−ΔB) to (B1+ΔB), a ratio of the output luminance level tothe input luminance level in the gamma curve G2 subjected to thegradation-altering characteristic changing process is larger than aratio of the output luminance level to the input luminance level in thegamma curve G1 not subjected to the gradation-altering characteristicchanging process. Meanwhile, in the range of input luminance levels from(B2−ΔB) to (B2+ΔB), the ratio of the output luminance level to the inputluminance level in the gamma curve G2 subjected to thegradation-altering characteristic changing process is less than theratio of the output luminance level to the input luminance level in thegamma curve G1 not subjected to the gradation-altering characteristicchanging process.

Having finished the process at step SA74 or at step SA75 in FIG. 5, thatis, having finished the gradation-altering characteristic changingprocess at step SA7 in FIG. 3, CPU 6 advances to step SA8. When thegamma curve G1 has been changed to the gamma curve G2 in thegradation-altering characteristic changing process at step SA7, theimage is subjected to the gamma correction process based on the gammacurve G2 and displayed on the touch panel LCD 12 as a live view display.In other words, when the gamma curve G1 has been changed to the gammacurve G2, the gamma correction processing unit 5 e of DSP 5 performs thegamma correction process using the gamma curve G2 on the digital signalgenerated by AFE 4.

FIG. 8 is a view showing an image 201, which is obtained by performingon the image 20 the gamma correction process using the gamma curve G2.As shown in FIG. 8, the segment of the human face 211 in the image 201is brighter than the segment of the human face 211 in the image 20(subjected to the gamma correction process using the gamma curve G1).Meanwhile, the segment of the cloud 22 in the image 201 is darker thanthe segment of the cloud 22 in the image 20.

At step SA8 in FIG. 3, CPU 6 judges whether or not the user has operatedthe shutter key. Receiving from the key block 10 no signal correspondingto user's key operation, CPU 6 determines that the user has not operatedthe shutter key (NO at step SA8), and returns to step SA4. Meanwhile,when the user has operated the shutter key, CPU 6 receives the signalcorresponding to user's key operation from the key block 10 anddetermines that the user has operated the shutter key (YES at step SA8),advancing to step SA9.

CPU 6 makes the shutter mechanism 2 open and close at step SA9 to shootan object to accumulate an image signal in CCD 3. CPU 6 makes AFE 4produce a digital signal from the image signal accumulated in CCD 3.Further, CPU 6 makes DSP 5 perform various processes including the gammacorrection process on the digital signal to produce image data,compressing the image data and generating data in JPEG format (JointPhotographic Experts Group format). During the above process, the gammacorrection processing unit 5 e of DSP 5 performs the gamma correctionprocess using the gamma curve G2 (gradation altering characteristic)changed at step SA7 on the digital signal. In the image expressed by theresultant image data, luminance levels of the user's desired objectsegments are adjusted according to his or her intention.

CPU 6 records the image data generated at step SA9 in the memory card 9at step SA10. As a result, in the first embodiment it is possible torecord an image, in which luminance levels of the user's desired objectsegments are adjusted according to his or her intention.

Having finished the process at step SA10, CPU 6 finishes the process inthe shooting mode, shown by the flow chart of FIG. 3.

In the digital camera 100 according to the first embodiment describedabove, plural areas defined by contours in the image are set as objectsegments, and thereafter the gradation altering characteristic (gammacurve) is changed to alter the luminance level of each of the objectsegments selected in response to user's touch operation. In this way,before the user touches the touch panel LCD 12 to alter the luminancelevel of his or her desired object segment, the whole area of eachobject in the image can be previously set as a segment whose luminancelevel is to be altered. This allows the user to alter the luminancelevel of the whole object segment simply by touching once his or herdesired object segment in the image displayed on the touch panel LCD 12.As a result, in the digital camera 100 according to the firstembodiment, the user can alter the luminance level (brightness) of thewhole of his or her desired object segment simply by touching suchobject segment once.

In the digital camera 100 according to the first embodiment, pluralareas defined by contours in the image are set as object segments, andthe gradation altering characteristic (gamma curve) is changed to alterluminance levels of object segments selected by user's touch operation.In this way, the user can select any object segment in the imagedisplayed on the touch panel LCD 12 as a segment whose luminance levelis to be altered. As a result, in the digital camera 100 according tothe first embodiment, the user can alter the luminance level(brightness) of an object segment in the image displayed on the touchpanel LCD 12.

The digital camera 100 according to the first embodiment is arranged toallow the user make higher or lower the luminance level of the objectsegment in response to user's touch operation. Therefore, the user canalter the luminance level of the image displayed on the touch panel LCD12 at his or her intention.

In the digital camera 100 according to the first embodiment, pluralareas defined by contours in the image are automatically set as objectsegments, whose luminance levels are to be altered. Even if an objectseen in the image displayed on the touch panel LCD 12 is large, the useris allowed to set plural object segments in the image as segments whoseluminance levels are to be altered, simply by touching once his or herdesired object segments in the image.

Second Embodiment of the Invention

The second embodiment of the invention will be described in detail.Since the digital camera 100 according to the second embodiment of theinvention is substantially the same as the digital camera 100 accordingto the first embodiment, and therefore the detailed description thereofwill be omitted.

FIG. 9 is a flow chart of an operation performed by the digital camera100 in the shooting mode in the second embodiment of the invention. CPU6 reads the program from the flash memory 7 and expands the program onDRAM 8, thereby performing the operation in accordance with the flowchart of FIG. 9. The operation performed by the digital camera 100 inthe shooting mode will be described with reference to the flow chart ofFIG. 9.

CPU 6 starts a displaying process to display an image (a live viewimage) on the touch panel LCD 12 at step SB1. The displaying process atstep SB1 is substantially the same as the process at step SA1 in thefirst embodiment. An image which is subjected to the gamma correctionusing the gamma curve G1 shown in FIG. 2 is first displayed on the touchpanel LCD 12. For example, in the case that an image 40 shown in FIG. 10is shot in a live view displaying process, the image which is generatedfrom the image 40 subjected to the gamma correction process using thegamma curve G1 is displayed on the touch panel LCD 12 at the beginning.In the image 40 shown in FIG. 10, objects such as a ball 41 andbackground 42 are seen within an external frame 50 defining a shootingangle. A segment of the ball 41 includes a dark segment 411 whoseluminance level is lower than an average luminance level “B3” of theball 41 and a bright segment 412 whose luminance level is higher thanthe average luminance level “B3” of the ball 41. The average luminancelevel “B3” of the ball 41 is equivalent to an average of luminancelevels of all the picture elements composing the segment of the ball 41.

At step SB2, CPU 6 makes the contour detecting unit 5 a of DSP 5 detecta contour in an image that is expressed by a digital signal anddisplayed on the touch panel LCD 12. For example, in the image 40 shownin FIG. 10, a contour 41 a of the ball 41 is detected at step SB2.

At step SB3, CPU 6 makes the segment setting unit 5 b of DSP 5 setplural areas defined by the contours detected at step SB2 as pluralobject segments whose luminance levels are to be altered. Take forexample the image 40 shown in FIG. 10, the object segments are areaswhere the ball 41 and background 42 are seen respectively.

At step SB4, CPU 6 is brought into a standby state for user's “touchoperation” on the touch panel LCD 12 to select an object segment whoseluminance level is to be altered. In the standby state, the user isallowed to touch his or her desired point on the image displayed on thetouch panel LCD 12 to select an object segment whose luminance level isto be altered. When the user has touched the touch panel LCD 12 with hisor her finger or with the pen and CPU 6 receives from the touch panelLCD 12 a signal indicating coordinates of the touch point at step SB4(YES at step SB4), then CPU 6 advances to step SB5. Meanwhile, when CPU6 receives from the touch panel LCD 12 no signal indicating coordinatesof the touch point at step SB4 (NO at step SB4), then CPU 6 advances tostep SB6. The user is allowed to touch any area on the image to selectan object segment, every time CPU 6 returns to step SB4, whereby pluralobject segments are selected.

CPU 6 performs a gradation-altering characteristic changing process atstep SB5. FIG. 11 is a flow chart showing the gradation-alteringcharacteristic changing process performed at step SB5. Thegradation-altering characteristic changing process will be described indetail with reference to the flow chart of FIG. 11.

CPU 6 supplies the signal (signal indicating coordinates of the touchpoint) sent from the touch panel LCD 12 to the segment selecting unit 5c at step SB51 in FIG. 11. The segment selecting unit 5 c selects theobject segment (touched object segment) including the coordinates of thetouch point indicated by the signal supplied from CPU 6 as a segmentwhose luminance level is to be altered. The segment selecting unit 5 csends a signal indicating the segments selected at step SB51 to thelight metering/calculating unit 5 d. In the case that plural objectsegments are touched by the user at step SB4, the segment selecting unit5 c selects the plural touched object segments as segments whoseluminance level are to be altered.

At step SB52, CPU 6 makes the light metering/calculating unit 5 d of DSP5 calculate an average luminance level “B” of the selected objectsegment of the image expressed by digital signal stored in DRAM 8. Theaverage luminance level “B” is an average of luminance levels of pictureelements composing the object segment selected at step SB51.

At step SB53, CPU 6 makes the gamma characteristic changing unit 5 f ofDSP 5 change the gamma curve G1 (gradation altering characteristic).More specifically, the gamma characteristic changing unit 5 f decreasesa portion of the gamma curve G1 in a range of input luminance levelsfrom (B−ΔB) to “B” with reference to the average luminance level “B”calculated at step SB52. The decreased portion of the gamma curve G1 canbe replaced with a spline curve passing through three points such as afirst point, a second point and a third point on the gamma curve G1,wherein the first point is a point on the gamma curve G1 correspondingto the input luminance level (B−ΔB), the second point is a point wherean output luminance level is given by half of the input luminance level(average luminance level) “B”, and the third point is a point on thegamma curve G1 corresponding to the input luminance level “B”.

At step SB54, CPU 6 makes the gamma characteristic changing unit 5 f ofDSP 5 change the gamma curve G1 (gradation altering characteristic).More specifically, under control of CPU 6, the gamma characteristicchanging unit 5 f increases a portion of the gamma curve G1 in a rangeof input luminance levels from “B” to (B+ΔB) with reference to theaverage luminance level “B” calculated at step SB52. The increasedportion of the gamma curve G1 can be replaced with a spline curvepassing through three points such as a first point, a second point and athird point on the gamma curve G1, wherein the first point is a point onthe gamma curve G1 corresponding to the input luminance level “B”, thesecond point is a point where an output luminance level is given by adoubled input luminance level (average luminance level “B”) “2B”, andthe third point is a point on the gamma curve G1 corresponding to theinput luminance level (B+ΔB).

FIG. 12 is a view showing an example of the gamma curve changed in thegradation-altering characteristic changing process performed at step SB5in FIG. 9. In FIG. 12 is shown a gamma curve G3, which is changed in thegradation-altering characteristic changing process when the user hastouched a point within the segment of the ball 41 in the image 40 shownin FIG. 10. In FIG. 12, an input luminance level “B3” corresponds to theaverage luminance level of the segment of the ball 41 calculated by thelight metering/calculating unit 5 d at step SB52. As shown in FIG. 12,in the range of input luminance levels from (B3−ΔB) to “B3”, a ratio ofthe output luminance level to the input luminance level in the gammacurve G3 subjected to the gradation-altering characteristic changingprocess is less than a ratio of the output luminance level to the inputluminance level in the gamma curve G1 not subjected to thegradation-altering characteristic changing process. Meanwhile, in therange of input luminance levels from “B3” to (B3+ΔB), the ratio of theoutput luminance level to the input luminance level in the gamma curveG3 subjected to the gradation-altering characteristic changing processis larger than the ratio of the output luminance level to the inputluminance level in the gamma curve G1 not subjected to thegradation-altering characteristic changing process.

Having finished the processes at steps SB53 and SB54 in FIG. 11, thatis, having finished the gradation-altering characteristic changingprocess at step SB5 in FIG. 9, CPU 6 advances to step SB6. Once thegamma curve G1 has been changed to the gamma curve G3 in thegradation-altering characteristic changing process at step SB5, theimage is subjected to the gamma correction process based on the gammacurve G3 and displayed on the touch panel LCD 12 as a live view display.In other words, when the gamma curve G1 has been changed to the gammacurve G2, the gamma correction processing unit 5 e of DSP 5 performs thegamma correction process using the gamma curve G3 on the digital signal.

FIG. 13 is a view showing an image 401, which has been obtained byperforming the gamma correction process using the gamma curve G3 on theimage 40 shown in FIG. 10. As shown in FIG. 13, the dark segment 411 ofthe ball 41 in the image 401 is darker than the dark segment 411 of theball 41 in the image 40 (FIG. 10). This is because luminance levels ofall the picture elements composing the dark segment 411 in the image 40fall within a range from (B−ΔB) to “B” and the output luminance level ofthe dark segment 411 subjected to the gamma correction process using thegamma curve G3 is less than the output luminance level of the darksegment 411 subjected to the gamma correction process using the gammacurve G1, which has not yet been changed.

Meanwhile, as shown in FIG. 13 the bright segment 412 in the image 401is brighter than the bright segment 412 in the image 40 (FIG. 10). Thisis because luminance levels of all the picture elements composing thedark segment 412 in the image 40 fall within a range from “B” to (B+ΔB)and the output luminance level of the dark segment 412 subjected to thegamma correction process using the gamma curve G3 is higher than theoutput luminance level of the dark segment 412 subjected to the gammacorrection process using the gamma curve G1, which has not yet beenchanged.

As described, when the image 40 is subjected to the gamma correctionprocess using the gamma curve G3, contrast in a segment of the ball 41where the user touches in the image 401 is enhanced, wherein thecontrast means a difference in luminance between the dark segment 411and bright segment 412.

At step SB6 in FIG. 9, CPU 6 judges whether or not the user has operatedthe shutter key. Receiving from the key block 10 no signal correspondingto user's key operation, CPU 6 determines that the user has not operatedthe shutter key (NO at step SB6), and returns to step SB4. Meanwhile,when the user has operated the shutter key, CPU 6 receives the signalcorresponding to user's key operation from the key block 10 anddetermines that the user has operated the shutter key (YES at step SB6),advancing to step SB7.

CPU 6 makes the shutter mechanism 2 open and close at step SB7 to shootan object to accumulate an image signal in CCD 3. CPU 6 makes AFE 4produce a digital signal based on the image signal accumulated in CCD 3.Further, CPU 6 makes DSP 5 perform various processes including the gammacorrection process on the digital signal to produce image data,compressing the image data and generating data in JPEG format (JointPhotographic Experts Group format). During the above process, the gammacorrection processing unit 5 e of DSP 5 performs the gamma correctionprocess using the gamma curve G3 changed at step SB5 on the produceddigital signal. In the image expressed by the image data generated atstep SB SB7, contrast of the user's desired object segment is enhanced.

CPU 6 records the image data generated at step SB7 in the memory card 9at step SB8. As a result, in the second embodiment it is possible torecord an image, in which contrast in the user's desired object segmentis enhanced.

Having finished the process at step SB8, CPU 6 finishes the operation inthe shooting mode, shown by the flow chart of FIG. 9.

In the digital camera 100 according to the second embodiment describedabove, plural areas defined by contours in the image are set as objectsegments, and thereafter the gradation altering characteristic (gammacurve) is changed to alter the luminance levels of the object segmentsselected in response to user's touch operation. In this way, before theuser touches the touch panel LCD 12 to alter the luminance levels of hisor her desired object segments, the whole area of each object in theimage can be previously set as the segment whose luminance level is tobe altered. This allows the user to alter the luminance level of thewhole object segment simply by touching once his or her desired objectsegment in the image displayed on the touch panel LCD 12. As a result,in the digital camera 100 according to the second embodiment, the usercan alter the luminance level (brightness) of the whole of his or herdesired object segment simply by touching the object segment once.

In the digital camera 100 according to the second embodiment, pluralareas defined by contours in the image are set as object segments, andthe gradation altering characteristic (gamma curve) is changed to alterluminance levels of object segments selected by user's touch operation.In this way, the user can select an object segment in the imagedisplayed on the touch panel LCD 12 as a segment whose luminance levelis to be altered. As a result, in the digital camera 100 according tothe second embodiment, the user can alter a brightness level of anobject segment in the image displayed on the touch panel LCD 12.

In the digital camera 100 according to the second embodiment, theluminance level of the bright segment of the object segment selected inresponse to the touch operation is automatically made higher and theluminance level of the dark segment of the object segment selected inresponse to the touch operation is automatically made lower simply bytouching once his or her desired object segment displayed on the touchpanel LCD 12, wherein the bright segment is a segment whose luminancelevel is higher than an average luminance level of the object segmentand the dark segment is a segment whose luminance level is lower thanthe average luminance level of the object segment. In this way, the usercan enhance contrast or increase a difference in luminance level betweenthe bright segment and dark segment in his or her desired object segmentsimply by touching such object segment once. In other words, in thedigital camera 100 according to the second embodiment, the user canenhance the contrast in his or her desired segment in the image by asimple operation, such as, touching the touch panel LCD 12 once.

In the digital camera 100 according to the second embodiment, pluralareas defined by contours in the image are automatically set as objectsegments, whose luminance levels are to be altered. Even if an object iscomplex in shape, the above arrangement allows the user to set pluralobject segments in the image as segments whose luminance levels are tobe altered, simply by touching once his or her desired object segment inthe image.

MODIFICATIONS

The embodiments have been described in the foregoing detaileddescription by way of examples of the invention and it should beunderstood that the invention is not limited to the particularembodiments described herein, but numerous rearrangements,modifications, and substitutions may be made to the embodiments of theinvention without departing from the scope of the invention.

FIG. 14 is a flow chart of a modified process of the gradation-alteringcharacteristic changing process performed at step SA7 in FIG. 3. Themodified gradation-altering characteristic changing process will bedescribed in detail with reference to the flow chart of FIG. 14. In thedigital camera 100, the modified gradation-altering characteristicchanging process shown in FIG. 14 is performed in place of thegradation-altering characteristic changing process shown in FIG. 5.

A process to be performed at step SC71 in FIG. 14 is substantially thesame as the process performed at step SA71 in FIG. 5, and therefore thedescription thereof will be omitted. Further, a process to be performedat step SC72 is substantially the same as the process performed at stepSA73 in FIG. 5, and therefore the description thereof will be omitted,too.

At step SC73, CPU 6 makes the gamma characteristic changing unit 5 f ofDSP 5 change the gamma curve (gradation altering characteristic) to beapplied to the object segment touched by the user, or to be applied tothe segment that is selected by the segment selecting unit 5 c inresponse to user's touch operation. More specifically, under control ofCPU 6, the gamma characteristic changing unit 5 f of DSP 5 changes thegamma curve to be applied to the object segment touched by the user fromthe gamma curve G1 shown in FIG. 2 to a gamma curve G4 shown in FIG. 15.In other words, the gamma curve to be applied to the object segmenttouched by the user is changed to the gamma curve G4 at step SC73, andthe gamma curve G1 shown in FIG. 2 is not changed at step SC73 andapplied to the segment other than the object segment touched by the user(or the gamma curve G1 is applied to the segment other than the segmentthat is selected by the segment selecting unit 5 c in response to user'stouch operation).

After step SC73, a live view image is displayed on the touch panel LCD12, in which live view image the object segments touched by the userhave been subjected to the gamma correction process using the gammacurve G4 and the segment other than the object segment touched by theuser is subjected to the gamma correction process using the gamma curveG1. In other words, the gamma correction processing unit 5 e of DSP 5performs the gamma correction process using the gamma curve G4 on thedigital signal expressing the object segments in the image touched bythe user and performs the gamma correction process using the gamma curveG1 on the digital signal expressing the segment other than the objectsegments in the image touched by the user.

The gamma curve G4 shown in FIG. 15 has a characteristic that convertsan input luminance level into an output luminance level that is higherthan the input luminance level in the whole range of the input luminancelevels (0-255). Therefore, the segment (object segment touched by theuser) subjected to the gamma correction process using the gamma curve G4at step SC73 is made more bright. The gamma curve applied to the objectsegment touched by the user in the process at step SC73 is not limitedto the gamma curve G4 shown in FIG. 15 but any gamma curve may be used,that has a characteristic that converts the input luminance level intothe output luminance level that is higher than the input luminance levelin the whole range of the input luminance levels (0-255).

At step SC74, CPU 6 makes the gamma characteristic changing unit 5 f ofDSP 5 change the gamma curve to be applied to the object segment touchedby the user at step SC71. More specifically, under control of CPU 6, thegamma characteristic changing unit 5 f of DSP 5 changes the gamma curveto be applied to the object segment touched by the user from the gammacurve G1 shown in FIG. 2 to a gamma curve G5 shown in FIG. 16. Asdescribed, the gamma curve G5 changed at step SC74 is applied to thesegment selected by the segment selecting unit 5 c in response to user'stouch operation, and meanwhile the gamma curve G1 shown in FIG. 2 isapplied to the segment other than the object segment to which the gammacurve G5 is applied.

After step SC74, a live view image is displayed on the touch panel LCD12, in which live view image the object segment touched by the user issubjected to the gamma correction process using the gamma curve G5 andthe segment other than the object segment touched by the user issubjected to the gamma correction process using the gamma curve G1. Inother words, the gamma correction processing unit 5 e of DSP 5 performsthe gamma correction process using the gamma curve G5 on the digitalsignal expressing the object segment of the image touched by the userand performs the gamma correction process using the gamma curve G1 onthe digital signal expressing the segment other than the object segmentof the image touched by the user.

The gamma curve G5 shown in FIG. 16 has a characteristic that convertsthe input luminance level into the output luminance level that is lowerthan the input luminance level in the whole range of the input luminancelevels (0-255). The segment (object segment touched by the user)subjected to the gamma correction process using a gamma curve G5 at stepSC73 is made darker. The gamma curve applied to the object segmenttouched by the user in the process at step SC74 is not limited to thegamma curve G5 shown in FIG. 16 but any gamma curve may be used, thathas a characteristic that converts the input luminance level into theoutput luminance level that is lower than the input luminance level inthe whole range of the input luminance levels (0-255).

1. An image processing apparatus comprising: a gradation correcting unitfor correcting a gradation of an image in accordance with a gradationaltering characteristic; an object segment setting unit for setting inthe image plural object segments whose luminance levels are to bealtered; an object segment selecting unit for selecting one objectsegment from the plural object segments set by the object segmentsetting unit in response to a single operation by a user; and agradation altering characteristic changing unit for changing thegradation altering characteristic in a luminance range of the objectsegment selected by the object segment selecting unit.
 2. The imageprocessing apparatus according to claim 1, further comprising: a contourdetecting unit for detecting a contour of an object seen in the image;wherein the object segment setting unit sets plural segments defined bythe contours detected by the contour detecting unit as object segmentswhose luminance levels are to be altered.
 3. The image processingapparatus according to claim 1, wherein the object segment selectingunit selects one and more object segments from the plural objectsegments set by the object segment setting unit in response to theoperation by a user.
 4. The image processing apparatus according toclaim 1, further comprising: an altering condition setting unit forsetting one of a first altering condition and a second alteringcondition, wherein the first altering condition is for increasing aluminance level of each of the object segments selected by the objectsegment selecting unit and the second altering condition is fordecreasing a luminance level of each of the object segments selected bythe object segment selecting unit, wherein the gradation alteringcharacteristic changing unit changes the gradation alteringcharacteristic in the luminance range of the object segment selected bythe object segment selecting unit based on the altering condition set bythe altering condition setting unit.
 5. The image processing apparatusaccording to claim 1, wherein the gradation altering characteristicchanging unit changes the gradation altering characteristic in theluminance range of the object segment selected by the object segmentselecting unit to enhance contrast in the object segment selected by theobject segment selecting unit.
 6. The image processing apparatusaccording to claim 5, further comprising: an average luminancecalculating unit for calculating an average luminance level of theobject segment selected by the object segment selecting unit, whereinthe gradation altering characteristic changing unit comprises adecreasing unit and an increasing unit, wherein the decreasing unitchanges the gradation altering characteristic in a luminance range lessthan the average luminance level calculated by the average luminancecalculating unit such that a ratio of an output luminance level to aninput luminance level in the gradation altering characteristic which hasbeen changed is made less than a ratio of an output luminance level toan input luminance level in the gradation altering characteristic whichis not changed, and the increasing unit changes the gradation alteringcharacteristic in a luminance range larger than the average luminancelevel calculated by the average luminance calculating unit such that aratio of an output luminance level to an input luminance level in thegradation altering characteristic which has been changed is made largerthan a ratio of an output luminance level to an input luminance level inthe gradation altering characteristic which is not changed.
 7. Acomputer readable recording medium mounted on an image processingapparatus provided with a computer, the recording medium having recordedthereon a computer program when executed to make the computer functionas units comprising: a gradation correcting unit for correcting agradation of an image in accordance with a gradation alteringcharacteristic; an object segment setting unit for setting in the imageplural object segments whose luminance levels are to be altered; anobject segment selecting unit for selecting one object segment from theplural object segments set by the object segment setting unit inresponse to a single operation by a user; and a gradation alteringcharacteristic changing unit for changing the gradation alteringcharacteristic in a luminance range of the object segment selected bythe object segment selecting unit.